This application is based on and incorporates herein by reference Japanese Patent Application No. 11-339992 filed Nov. 30, 1999.
This application relates to an electronic control apparatus and method for controlling internal combustion engines, which reduces a CPU operation time rate when an internal combustion engine rotates at high rotation speeds.
Conventional electronic control apparatuses for internal combustion engines control fuel injection and ignition timing by executing various programmed control processing by respective central processing units (CPUS). Each CPU executes calculations of fuel injection amount and ignition timing as well as other associated processing in timed or synchronized relation with rotation of the engine, because the fuel injection and the ignition timing should be controlled in timed relation with the crankshaft rotation position of the engine. The CPU executes these calculations and associated processing as its rotation interrupt routines with high priority while interrupting other low priority routines such as a base routine and time interrupt routines. The CPU operates to execute the rotation interrupt routines more often per unit time as the engine rotation speed increases, resulting in an increase of the CPU operation time rate which is defined as the percentage of time the CPU operates (executes the rotation interrupt routines) per unit time.
The CPU usually needs some wait-time to access memories such as ROMs and RAMs in retrieving stored programs or data therefrom in the routines. The CPU operation time rate can be reduced by using high speed memories which are of the short access time-type and setting short wait-time. However, if the CPU access low speed memories while setting the short wait-time, the CPU starts retrieving the programs or data before data has completely been output from the memory. The CPU thus fails to retrieve data and calculate control data using the retrieved data.
Further, the access time of a memory increases as a power supply voltage such as a battery voltage falls. The battery voltage excessively falls when the engine is cranked by a starter motor, thus disabling the CPU to retrieve data from the memories with the set wait-time. This problem also occurs when an ignition switch is turned off, because the voltage supplied to the CPU falls gradually. In this instance, the CPU is disabled to access programs stored in the memory correctly, as the result, the CPU may write the wrong data in a battery back-up RAM.
It is therefore an object of the present invention to provide an electronic control apparatus and method which is capable of reducing an operation time rate of a central processing unit.
It is a further object of the present invention to provide an electronic control apparatus and method which is capable of enabling a central processing unit to operate properly when an access time of a memory is lengthened.
According to the present invention, an electronic control apparatus for engines has a memory and a processing unit. The processing unit executes various processing routines while accessing the memory in a predetermined access speed or wait-time. The routines include a rotation interrupt routine which is initiated in synchronized relation with a rotation of an engine. The memory access speed of the processing unit is set initially to a low speed when an ignition switch is turned on to start a power supply to the processing unit, so that the processing routines are executed by the processing unit in the low access speed. When a rotation speed of the engine rises and a rate of execution of the interrupt routine by the processing unit increases, the memory access speed is changed to a high access speed. When the ignition switch is turned off to stop the power supply to the processing unit, the memory access speed is returned to the low access speed.